﻿using System;
using System.Collections.Generic;
using System.Text;
using System.Windows.Forms;
using System.Drawing;
using SkinEngines.SkinForm.Painting;

namespace SkinEngines.SkinCore
{
    /// <summary>
    /// Skin Base -- Skined of base for all winform
    /// </summary>
    public abstract class SkinBase
    {
        /// <summary>
        /// Called when the skin is loaded.
        /// </summary>
        public virtual void OnLoad()
        {
            // Optional Override
        }

        /// <summary>
        /// Called when the form region needs to be set.
        /// </summary>
        /// <param name="form">The form whose region need to be set.</param>
        /// <param name="size">The size of the form which should be used for region calculation.</param>
        public abstract void OnSetRegion(Form form, Size size);

        /// <summary>
        /// Called when the non client area of the form needs to be painted.
        /// </summary>
        /// <param name="form">The form which gets drawn.</param>
        /// <param name="paintData">The paint data to use for drawing.</param>
        /// <returns><code>true</code> if the original painting should be suppressed, otherwise <code>false</code></returns>
        public abstract bool OnPaint(Form form);

        /// <summary>
        /// Called when the non client area of the form needs to be painted.
        /// </summary>
        /// <param name="form">The form which gets drawn.</param>
        /// <param name="paintData">The paint data to use for drawing.</param>
        /// <returns><code>true</code> if the original painting should be suppressed, otherwise <code>false</code></returns>
        public abstract bool OnPaint(IntPtr handler);

        /// <summary>
        /// Called when the non client area of the form needs to be painted.
        /// </summary>
        /// <param name="form">The form which gets drawn.</param>
        /// <param name="paintData">The paint data to use for drawing.</param>
        /// <returns><code>true</code> if the original painting should be suppressed, otherwise <code>false</code></returns>
        public abstract bool OnNcPaint(Form form, SkinningFormPaintData paintData);

        /// <summary>
        /// Called when the non client area of the form needs to be painted.
        /// </summary>
        /// <param name="form">The form which gets drawn.</param>
        /// <param name="paintData">The paint data to use for drawing.</param>
        /// <returns><code>true</code> if the original painting should be suppressed, otherwise <code>false</code></returns>
        public abstract bool OnNcPaint(IntPtr handler, SkinningFormPaintData paintData);
    }
}
